<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"          
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">

    <f:view contentType="text/html">
        <h:head>
            <c:set var="root" value="/" />            
            <c:set var="root2" value="#{request.contextPath}/" />
            <c:set var="rootImagen" value="#{root}resources/img/" />            
            <c:set var="rootEgresado" value="#{root}egresado/" />
            <c:set var="rootEmpresa" value="#{root}empresa/" />
            <c:set var="rootOcaa" value="#{root}ocaa/" />
            <c:set var="rootBienestar" value="#{root}bienestar/" />
            <c:set var="rootAdmin" value="#{root}admin/" />
            <meta content='text/html; charset=UTF-8' http-equiv="Content-Type"/>
            <link rel="stylesheet" type="text/css" href="#{root2}resources/css/estilo.css"/> 
            <script type="text/javascript" src="#{root2}resources/js/funciones.js"></script>
            <title>Sisece</title>            
        </h:head>
        <h:body>
            <p:layout style="width: 1060px;height: 2400px;margin-left:auto; margin-right:auto;">
                <p:layoutUnit  position="north" size="240" resizable="false" closable="false" collapsible="false">
                    <a href="#{root2}index.xhtml"><p:graphicImage height="150" value="#{rootImagen}ocaa_logo_02.jpg" /></a>

                    <p:menubar style="width: 1000px; margin-left:auto; margin-right:auto;">
                        <f:facet name="options">
                            <p:commandButton value="Iniciar Sesion" onclick="PF('dlg1').show();"  icon="ui-icon-star" />
                            <p:dialog modal="true" appendTo="@(body)" widgetVar="dlg1" 
                                      id="dialog" header="Login" >

                                <p:tabView id="tabView001"  >
                                    <p:tab title="Egresado">
                                        <h:form id="form09" >                                
                                            <p:growl id="form09growl01" for="forform09growl01" showDetail="true" life="1000"  />
                                            <p:panel >
                                                <p:panelGrid columns="2">                        
                                                    <p:graphicImage value="/resources/img/alumno.jpg" />

                                                    <p:panelGrid id="grid_login_alumno" columns="3" style="margin-left:auto; margin-right:auto;"  >

                                                        <p:outputLabel value="Usuario: *" />
                                                        <p:inputText id="user" value="#{usuarioEgresado.username}" required="true" label="usuario"/>
                                                        <p:message for="user" display="both" />

                                                        <p:outputLabel value="Contraseña: *" />
                                                        <p:password id="password" value="#{usuarioEgresado.password}" feedback="false" required="true" label="clave" />
                                                        <p:message for="password" display="both" />

                                                        <f:facet name="footer">                                        
                                                            <p:commandButton id="loginButtonAlumno" value="Ingresar" icon="ui-icon-check"
                                                                             actionListener="#{usuarioEgresado.login}" update="form09growl01,grid_login_alumno"                                         
                                                                             oncomplete="javascript: manejarLogin(xhr, status, args)" />
                                                            <p:commandButton type="reset" value="Limpiar" update="grid_login_alumno" />
                                                        </f:facet>
                                                    </p:panelGrid>

                                                </p:panelGrid>
                                            </p:panel>   
                                            <p:blockUI block=":tabView001" trigger="loginButtonAlumno">
                                                LOADING<br />
                                                <p:graphicImage value="./resources/img/loading.gif"/>
                                            </p:blockUI>
                                        </h:form>
                                    </p:tab>
                                </p:tabView>
                            </p:dialog>
                        </f:facet>
                    </p:menubar>

                </p:layoutUnit>

                <p:layoutUnit position="south" size="40" resizable="false" closable="false" collapsible="false">                    
                    Copyright © 2014 All rights reserved
                </p:layoutUnit>

                <p:layoutUnit position="center"   resizable="true" closable="true" collapsible="true">                    
                    <ui:insert name="content">
                    </ui:insert>
                </p:layoutUnit>
                
                <p:layoutUnit position="right" size="250" >
                    
                </p:layoutUnit>
            </p:layout>

        </h:body>        
    </f:view>

</html>
